#import "AmazingXenonController.h"
        
#import "AmazingXenonModel.h"
#import "AmazingXenonCell.h"
#import "Masonry.h"

@interface AmazingXenonController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *velvetIdealKnotCollectionView;
@property (nonatomic, strong) NSMutableArray *knotFlowModels;

@end

@implementation AmazingXenonController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self cableInspireRadiateInitui];
	[self leapfrogHologramrequestData];
}


//: 初始化页面UI
- (void)cableInspireRadiateInitui {
	[self.view addSubview:self.velvetIdealKnotCollectionView];
	[self.velvetIdealKnotCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.edges.equalTo(self.view);
	}];
}


//: 获取数据模型
- (void)leapfrogHologramrequestData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)knotFlowModels {
	if (!_knotFlowModels) {
		_knotFlowModels = [NSMutableArray array];
	}
	return _knotFlowModels;
}

- (UICollectionView *)velvetIdealKnotCollectionView {
    if (!_velvetIdealKnotCollectionView) {
        UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
        flowLayout.minimumLineSpacing = 10;
        flowLayout.minimumInteritemSpacing = 10;
        flowLayout.itemSize = CGSizeMake(100, 100);
        flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
        
        _velvetIdealKnotCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:flowLayout];
        _velvetIdealKnotCollectionView.backgroundColor = UIColor.clearColor;
        _velvetIdealKnotCollectionView.delegate = self;
        _velvetIdealKnotCollectionView.dataSource = self;
        _velvetIdealKnotCollectionView.showsHorizontalScrollIndicator = NO;
        _velvetIdealKnotCollectionView.showsVerticalScrollIndicator = NO;
        [_velvetIdealKnotCollectionView registerClass:[AmazingXenonCell class] forCellWithReuseIdentifier:NSStringFromClass([AmazingXenonCell class])];
    }
    return _velvetIdealKnotCollectionView;
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.knotFlowModels.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    AmazingXenonCell *enigmaDreamerPerceptive = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([AmazingXenonCell class]) forIndexPath:indexPath];
    return enigmaDreamerPerceptive;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
